<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddIndexChatGlobalIdToChatUnreadMessageTable extends AbstractMigration
{
    public function up()
    {
        $this->table("chat_unread_message")
            ->addIndex(['chat_global_id'], ['type' => 'normal', 'name' => 'idx_chat_global_id'])
            ->save();
    }

    public function down()
    {
        $this->table("chat_unread_message")
            ->removeIndexByName("idx_chat_global_id")->save();
    }
}
